public class NumFactorialSum {
    public static void main(String[] args) {
    int n=numFactorialSum(10);
        System.out.println(n);
    }
    public static int numFactorialSum(int n){
        if(n==1){
            return 1;
        }
        int x=numFactorialSum(n-1);
        return n+x;
    }
}
